package com.zuihai.app.di.module;

import com.jess.arms.di.scope.FragmentScope;
import com.zuihai.app.mvp.contract.DetailShoppingContract;
import com.zuihai.app.mvp.model.DetailShoppingModel;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2017/5/16 0016.
 */

@Module
public class DetailShoppingModule {
    private DetailShoppingContract.View view;

    /**
     * 构建DetailShoppingModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public DetailShoppingModule(DetailShoppingContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    DetailShoppingContract.View provideDetailShoppingView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    DetailShoppingContract.Model provideDetailShoppingModel(DetailShoppingModel model) {
        return model;
    }
}